package cn.brilliantfuture.commentry.entity;

// Generated 2012-7-16 16:25:58 by Hibernate Tools 3.3.0.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * AdvertPubRecord generated by hbm2java
 */
@Entity
@Table(name = "advert_pub_record", catalog = "cabinet")
public class AdvertPubRecord implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer advertPlayRecordId;
	private Lockers lockers;
	private UserGroup userGroup;
	private String content;
	private Integer screen;
	private Integer inStyle;
	private Integer inSpeed;
	private Integer outStyle;
	private Integer outSpeed;
	private int stayTime;
	private Date playTime;
	private Date insertTime;

	public AdvertPubRecord() {
	}

	public AdvertPubRecord(Lockers lockers, UserGroup userGroup, String content, Integer screen, Integer inStyle, Integer inSpeed, Integer outStyle, Integer outSpeed, int stayTime, Date playTime, Date insertTime) {
		this.content = content;
		this.lockers = lockers;
		this.userGroup = userGroup;
		this.screen = screen;
		this.inStyle = inStyle;
		this.inSpeed = inSpeed;
		this.outStyle = outStyle;
		this.outSpeed = outSpeed;
		this.stayTime = stayTime;
		this.playTime = playTime;
		this.insertTime = insertTime;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "advert_play_record_id", unique = true, nullable = false)
	public Integer getAdvertPlayRecordId() {
		return this.advertPlayRecordId;
	}

	public void setAdvertPlayRecordId(Integer advertPlayRecordId) {
		this.advertPlayRecordId = advertPlayRecordId;
	}

	@Column(name = "content", nullable = false, length = 1000)
	@NotNull
	@Length(max = 1000)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "screen", nullable = false)
	public Integer getScreen() {
		return this.screen;
	}

	public void setScreen(Integer screen) {
		this.screen = screen;
	}

	@Column(name = "in_style", nullable = false)
	public Integer getInStyle() {
		return this.inStyle;
	}

	public void setInStyle(Integer inStyle) {
		this.inStyle = inStyle;
	}

	@Column(name = "in_speed", nullable = false)
	public Integer getInSpeed() {
		return this.inSpeed;
	}

	public void setInSpeed(Integer inSpeed) {
		this.inSpeed = inSpeed;
	}

	@Column(name = "out_style", nullable = false)
	public Integer getOutStyle() {
		return this.outStyle;
	}

	public void setOutStyle(Integer outStyle) {
		this.outStyle = outStyle;
	}

	@Column(name = "out_speed", nullable = false)
	public Integer getOutSpeed() {
		return this.outSpeed;
	}

	public void setOutSpeed(Integer outSpeed) {
		this.outSpeed = outSpeed;
	}

	@Column(name = "stay_time", nullable = false)
	public int getStayTime() {
		return this.stayTime;
	}

	public void setStayTime(int stayTime) {
		this.stayTime = stayTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "play_time", nullable = false, length = 19)
	@NotNull
	public Date getPlayTime() {
		return this.playTime;
	}

	public void setPlayTime(Date playTime) {
		this.playTime = playTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "insert_time", nullable = false, length = 19)
	@NotNull
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "lockers_id", nullable = false)
	@NotNull
	public Lockers getLockers() {
		return lockers;
	}

	public void setLockers(Lockers lockers) {
		this.lockers = lockers;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "group_id", nullable = false)
	@NotNull
	public UserGroup getUserGroup() {
		return userGroup;
	}

	public void setUserGroup(UserGroup userGroup) {
		this.userGroup = userGroup;
	}

}
